<?php        
/**
 * @copyright     ZaZa Group
 * @author        Sir Doan
 */

session_start(1);
date_default_timezone_set ( 'Asia/Bangkok' ); // Set Time Zone required tu PHP 5    
define('ZAZA', true);
// Check fnc 
if(!isset($_GET['fnc'])) exit();
require_once 'config'. DIRECTORY_SEPARATOR .'define.php';   
// Check fnc Admin 
/*$arrFnc = explode('_', $_GET['fnc']);   
if($arrFnc['0'] != ADMIN_PATH && !isset($_POST['callback'])) exit();        */
//echo "hehe";
if (IN_DEBUG) { 
    require_once KERNEL_PATH . DS .'error.profiler.php';
    Profiler::getInstance ()->mark ( 'Begin script', 'run.index.php' );
}
require_once KERNEL_PATH . DS .'error.php';
require_once KERNEL_PATH . DS .'config.php';

Module::$current->run();
               
if (IN_DEBUG) {
    Profiler::getInstance ()->mark ( 'End script', 'run.index.php' );
    echo Profiler::debug ();
}    
?>
